<template>
  <div>list数组：{{ list }}</div>
  <div>计算属性：{{ changeList }}</div>
</template>

<script setup>
import { ref, computed } from "vue";
const list = ref([1, 2, 3, 4, 5, 6, 7, 8]);

const changeList = computed(() => {
  return list.value.filter((item) => item > 2);
});
setTimeout(() => {
  list.value.push(10, 11);
}, 2000);
</script>

<style>
#app {
  width: 100vw;
  height: 100vh;
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>
